package com.mjh.zhujianju.enums;

/**
 * 
 *@ClassName: SupervisionEstimateEnum 
 * @Description 
 * @author wangdong
 * @date 2018年8月29日 下午10:52:57   
 * @version V1.0 满意度
 */
public enum SupervisionEstimateEnum {

	satisfaction("1","满意"),
	basic("2","基本满意"),
	no("3","不满意");

    private String code;
    private String name;

    SupervisionEstimateEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static SupervisionEstimateEnum[] getEnums(){
        return SupervisionEstimateEnum.values();
    }

    public static String getName(String code){
        if(code == null){
            return null;
        }

        for (SupervisionEstimateEnum SupervisionEnum : SupervisionEstimateEnum.values()){
            if(code.equals(SupervisionEnum.getCode())){
                return SupervisionEnum.getName();
            }
        }

        return null;
    }
}
